<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page
	import="com.cys.bean.CurtainControl,com.cys.dao.CurtainControlDao"%>
<%
	request.setCharacterEncoding("UTF-8");
	String dev_curtain_controlor = request.getParameter("c_no");
	String cmd = request.getParameter("ce_cmd");
	CurtainControl curtainControl = new CurtainControl();
	if (dev_curtain_controlor != null && !dev_curtain_controlor.equals(""))
		curtainControl.setDev_curtain_controlor(Integer.parseInt(dev_curtain_controlor));
	if (cmd != null && !cmd.equals(""))
		curtainControl.setCmd(Integer.parseInt(cmd));
	boolean res = CurtainControlDao.getInstance().CurtainCmd(curtainControl);
	if (res) {
		System.out.println("添加成功");
		request.getRequestDispatcher("Control.jsp").forward(request, response);

	} else {
		System.out.println("添加失败");
		response.sendRedirect("Control.jsp");
	}
%>